﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.Carto;
using PlanningGIS.Util;

namespace PlanningGIS.Engine.Controls
{
    /// <summary>
    /// 绘制空间对象
    /// </summary>
    public interface IDrawGeometry
    {
        /// <summary>
        /// 是否添加到地图
        /// </summary>
        bool IsToMap { get; set; }

        /// <summary>
        /// 绘制的空间对象
        /// </summary>
        IGeometry Geometry { get; set; }
        
        /// <summary>
        /// 绘制完成事件
        /// </summary>
        event DrawFinishedEventHandler DrawFinished;

        /// <summary>
        /// 清除之前绘制的对象
        /// </summary>
        event NullParameter ClearElements;
    }

    /// <summary>
    /// 
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    public delegate void DrawFinishedEventHandler(object sender, DrawArgs e);

    /// <summary>
    /// 绘制的参数信息
    /// </summary>
    public class DrawArgs
    {
        /// <summary>
        /// 
        /// </summary>
        public IGeometry Geometry { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public IElement DrawElement { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int Shift { get; set; }
    }
}
